# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=oq
pkgver=1.1.2
pkgrel=0
pkgdesc="A portable jq wrapper with support of other formats than JSON"
url="https://github.com/blacksmoke16/oq"
arch="x86_64 aarch64"  # limited by Crystal
license="MIT"
depends="jq"
makedepends="crystal libxml2-dev yaml-dev"
source="https://github.com/Blacksmoke16/oq/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	mkdir -p bin
	crystal build --release -o bin/oq src/oq_cli.cr
}

check() {
	crystal spec
}

package() {
	install -D -m 755 bin/oq "$pkgdir"/usr/bin/oq
}

sha512sums="3cb91915fa42e4af1866f2cac1acd577e464ee70c17a196656eb59c945bc40e6da142857a5b4b374c22e643bc7cce84e09cbd7dc8d4b2dbb09d4821c393e90da  oq-1.1.2.tar.gz"
